package com.qst.oop;

public class Test02 {
    public static void main(String[] args) {
        Soldier s1=new Soldier();
        Soldier s2=new Soldier();
//        多态
//        子类指向子类
//        接口指向实现类
        Gun g1=new K98();
        Gun g2=new AK47();
        s1.fight(g1);
        s2.fight(g2);



    }
}
